﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="depart_list.aspx.cs" Inherits="BudgetSV.admin.manager.depart_list" %>

<%@ Import Namespace="BudgetSV.Common" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>组织机构管理</title>
    <script type="text/javascript" src="../../scripts/jquery/jquery-1.10.2.min.js"></script>
    <link href="../../scripts/artDialog4.1.7/skins/blue.css" rel="stylesheet" />
    <script src="../../scripts/artDialog4.1.7/jquery.artDialog.js"></script>
    <%--<script type="text/javascript" src="../../scripts/lhgdialog/lhgdialog.js?skin=idialog"></script>--%>

    <script type="text/javascript" src="../js/layout.js?a=1"></script>
    <link href="../skin/default/style.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" language="javascript">
        //$(document).ready(function () {
        //    $(".folder-open").click(function () {
        //        alert("here");
        //    })
        //})
    </script>
</head>

<body class="mainbody">
    <form id="form1" runat="server">
        <!--导航栏-->
        <div class="location">
            <a href="javascript:history.back(-1);" class="back"><i></i><span>返回上一页</span></a>
            <a href="javascript:parent.location.reload()" class="home"><i></i><span>首页</span></a>
            <i class="arrow"></i>
            <span>组织机构管理</span>
        </div>
        <!--/导航栏-->

        <!--工具栏-->
        <div class="toolbar-wrap">
            <div id="floatHead" class="toolbar">
                <div class="l-list">
                    <ul class="icon-list">
                        <li><a class="add" href="depart_edit.aspx?action=<%=DTEnums.ActionEnum.Add %>"><i></i><span>新增</span></a></li>
                        <li>
                            <asp:LinkButton ID="btnSave" runat="server" CssClass="save" OnClick="btnSave_Click"><i></i><span>保存</span></asp:LinkButton></li>
                        <li><a class="all" href="javascript:;" onclick="checkAll(this);"><i></i><span>全选</span></a></li>
                        <li>
                            <asp:LinkButton ID="btnDelete" runat="server" CssClass="del" OnClientClick="return ExePostBack('btnDelete','您确定您将删除该机构吗？');" OnClick="btnDelete_Click"><i></i><span>删除</span></asp:LinkButton></li>
                    </ul>
                </div>
            </div>
        </div>
        <!--/工具栏-->

        <!--列表-->
        <asp:Repeater ID="rptList" runat="server" OnItemDataBound="rptList_ItemDataBound" OnItemCommand="rptList_ItemCommand">
            <HeaderTemplate>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="ltable">
                    <tr>
                        <th width="8%">选择</th>
                        <th align="left">组织机构名称</th>
                        <th width="8%">组织机构管理</th>
                        <th width="8%">显示</th>
                        <th width="8%">默认</th>
                        <th align="left" width="65">排序</th>
                        <th width="12%">操作</th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td align="center">
                        <asp:CheckBox ID="chkId" CssClass="checkall" runat="server" Enabled='<%#bool.Parse((Convert.ToInt32(Eval("is_sys"))==0 ).ToString())%>' Style="vertical-align: middle;" />
                        <asp:HiddenField ID="hidId" Value='<%#Eval("id")%>' runat="server" />
                        <asp:HiddenField ID="hidLayer" Value='<%#Eval("class_layer") %>' runat="server" />
                    </td>
                    <td style="white-space: nowrap; word-break: break-all; overflow: hidden;">
                        <asp:Literal ID="LitFirst" runat="server"></asp:Literal>
                        <asp:Button runat="server" Style="display: none" ID="btnExpand" CommandName="Expand" CommandArgument='<%#Eval("id") %>'></asp:Button>
                        <a href="depart_edit.aspx?action=<%#DTEnums.ActionEnum.Edit %>&id=<%#Eval("id")%>"><%#Eval("name")%></a>
                    </td>
                    <td align="center" style="white-space: nowrap; word-break: break-all; overflow: hidden;">
                        <%# GetAddHtmlSr(Convert.ToInt32(Eval("class_layer")),Convert.ToInt32(Eval("id")))%>
                    </td>
                    <td align="center"><%#Convert.ToInt32(Eval("is_lock")) == 0 ? "是" : "否"%></td>
                    <td align="center"><%#Convert.ToInt32(Eval("is_sys")) == 1 ? "是" : "否"%></td>
                    <td>
                        <asp:TextBox ID="txtSortId" runat="server" Text='<%#Eval("sort_id")%>' CssClass="sort" onkeydown="return checkNumber(event);" /></td>
                    <td align="center" style="white-space: nowrap; word-break: break-all; overflow: hidden;">
                        <%# GetAddHtmlSr(Convert.ToInt32(Eval("class_layer")),Convert.ToInt32(Eval("id")))%>
                        <a href="depart_edit.aspx?action=<%#DTEnums.ActionEnum.Edit %>&id=<%#Eval("id")%>">修改</a>
                    </td>
                </tr>

                <div id="shell" runat="server" value='<%#Eval("id") %>'>
                    <asp:Repeater ID="rptChildren" runat="server" OnItemDataBound="rptList_ItemDataBound">
                        <ItemTemplate>
                            <tr>
                                <td align="center">
                                    <asp:CheckBox ID="chkId" CssClass="checkall" runat="server" Enabled='<%#bool.Parse((Convert.ToInt32(Eval("is_sys"))==0 ).ToString())%>' Style="vertical-align: middle;" />
                                    <asp:HiddenField ID="hidId" Value='<%#Eval("id")%>' runat="server" />
                                    <asp:HiddenField ID="hidLayer" Value='<%#Eval("class_layer") %>' runat="server" />
                                </td>
                                <td style="white-space: nowrap; word-break: break-all; overflow: hidden;">
                                    <asp:Literal ID="LitFirst" runat="server"></asp:Literal>
                                    <a href="depart_edit.aspx?action=<%#DTEnums.ActionEnum.Edit %>&id=<%#Eval("id")%>"><%#Eval("name")%></a>
                                </td>
                                <td align="center" style="white-space: nowrap; word-break: break-all; overflow: hidden;">
                                    <%# GetAddHtmlSr(Convert.ToInt32(Eval("class_layer")),Convert.ToInt32(Eval("id")))%>
                                </td>
                                <td align="center"><%#Convert.ToInt32(Eval("is_lock")) == 0 ? "是" : "否"%></td>
                                <td align="center"><%#Convert.ToInt32(Eval("is_sys")) == 1 ? "是" : "否"%></td>
                                <td>
                                    <asp:TextBox ID="txtSortId" runat="server" Text='<%#Eval("sort_id")%>' CssClass="sort" onkeydown="return checkNumber(event);" /></td>
                                <td align="center" style="white-space: nowrap; word-break: break-all; overflow: hidden;">
                                    <%# GetAddHtmlSr(Convert.ToInt32(Eval("class_layer")),Convert.ToInt32(Eval("id")))%>
                                    <a href="depart_edit.aspx?action=<%#DTEnums.ActionEnum.Edit %>&id=<%#Eval("id")%>">修改</a>
                                </td>
                            </tr>
                        </ItemTemplate>

                    </asp:Repeater>
                </div>

            </ItemTemplate>
            <FooterTemplate>
                <%#rptList.Items.Count == 0 ? "<tr><td align=\"center\" colspan=\"8\">暂无记录</td></tr>" : ""%>
</table>
            </FooterTemplate>
            
        </asp:Repeater>
        <!--/列表-->
    </form>
</body>
</html>
